package com.laiqilin.controller;

import com.laiqilin.common.util.R;
import com.laiqilin.entity.Student;
import com.laiqilin.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/student")
public class StudentController {
	@Autowired
	private StudentService studentService;
	@GetMapping("/list.do") // 学生列表
	public List<Student> findAll(){
		List<Student> list = studentService.getList();
		return list;
	}
}
